For information on how to load servlets using the Administration Tool, see Servlet Loading.
Remote servlets can be loaded by:
Servlets can be invoked by a client in the following ways:
The server gets a request for a document, looks up the configuration parameters, finds out that the document is not a static document residing on the disk, but a live document generated by a servlet object, and forwards the request to the servlet which services the request by generating the output. This method is the same as used by traditional web servers for invoking CGI scripts.
The client invokes the servlet with a URL of the form:
Any file ending with .shtml is a server parsed file. In .shtml, if a servlet tag or server-insert tag is present, then the server will run the servlet and insert the output generated by the servlet in the place of the insert tag.
Servlets can be dropped in to the servlets/ directory relative to the root of the server. Servlets placed in this directory can be invoked using their class names. (For example, if HelloWorld.class was placed in the server_root/servlets directory):
http://server_host_name:8080/servlet/HelloWorld
A class_file.initArgs file can be placed in the same directory for passing init args to the servlet in question. For example to pass two init args A=B and C=D to the HelloWorld servlet. A HelloWorld.initArgs file must be created in the extensions dir whose syntax would be:
A=B
C=B
When Servlets are recompiled in this directory - the new version will be
automatically loaded by the server.
This happens when a servlet is configured to be invoked when a particular mime type is set as the response. See the Filters and Servlet Chaining section for more on this topic.